<HTML>
  <HEAD>
    <TITLE>JNDI Test WebApp</TITLE>
    <META http-equiv="Pragma" content="no-cache">
    <META http-equiv="Cache-Control" content="no-cache,no-store">
    <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
  </HEAD>
<BODY>
  <A HREF="http://www.eclipse.org/jetty"><IMG SRC="images/jetty_banner.gif"></A>
  <br/>
  <b><a href="http://localhost:8080/">Demo Home</a></b>
  <hr/>
  <center><span style="color:red; font-variant:small-caps; font-weight:bold">Test Web Application Only - Do NOT Deploy in Production</span> </center>

<h1>JNDI Test WebApp</h1>

<p>
This example shows how to configure and lookup resources such as DataSources, a JTA transaction manager and a java.mail.Session in JNDI.
</p>

  <h2>Preparation</h2>
  <p>To enable JNDI in a base jetty instance do:
    <pre>
    $ cd $JETTY_BASE
    $ java -jar $JETTY_HOME/start.jar --add-to-startd=jndi
    </pre>
  </p>
  <p>This will create a $JETTY_BASE/start.d/jndi.ini file to enable and parameterise JNDI.  If the --add-to-start option instead, then the same initialisation will be appended to the
  $JETTY_BASE/start.ini file instead. The jetty demo-base already has JNDI enabled in the start.ini file and some mock resources included.  </p>
<p>The full source of this demonstration is available <a href="https://github.com/eclipse/jetty.project/blob/master/tree/tests/test-webapps/test-jndi-webapp">here</a>.</p>


<h2>Execution</h2>
<p>
Click <code>Test</code> to check the runtime lookup of the JNDI resources.
</p>
<form action="test" method="post">
      <button type="submit">Test</button>
</form>


  <hr/>
  <center> <a href="http://www.eclipse.org/jetty"><img style="border:0" src="images/small_powered_by.gif"/></a> </center>

</BODY>
</HTML>
